package com.zyd.controller;

import com.zyd.controller.result.Result;
import com.zyd.entity.CheckGroup;
import com.zyd.service.CheckGroupService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/checkgroup")
public class CheckGroupController {

    @Autowired
    private CheckGroupService checkGroupService;

    /**
     * 获取所有检查组（用于套餐表单下拉框）
     */
    @GetMapping("/listAll")
    public Result listAll() {
        List<CheckGroup> groups = checkGroupService.list();
        return Result.success(groups);
    }
}